#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDialog>
#include "dialog.h"
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


//void MainWindow::on_pushButton_clicked()
//{
//    QDialog* dialog=new QDialog(this);
//    dialog->show();
//    dialog->setWindowTitle("这是一个对话框");
//    dialog->resize(800,700);
//    dialog->setAttribute(Qt::WA_DeleteOnClose);
//}
void MainWindow::on_pushButton_clicked()
{
    Dialog* dialog=new Dialog(this);
    dialog->setWindowTitle("这是自己的对话窗窗口");
    dialog->resize(500,400);
    dialog->show();
    dialog->setAttribute(Qt::WA_DeleteOnClose);
}
